﻿<%@ Page Language="C#" MasterPageFile="~/Masterpage/CommonPage.master" AutoEventWireup="true" CodeFile="ManagementUser.aspx.cs" Inherits="User_ManagementUser" %>
<%@ Register Src="~/Controls/DepartmentSelector.ascx" TagName="DepartmentSelector" TagPrefix="Admin" %>
<%@ Register Src="~/Controls/SearchUserPanel.ascx" TagName="SearchUserPanel" TagPrefix="cec"%>
<%@ Register TagPrefix="ta" Src="~/Controls/QuestionAttributeSelecor.ascx" TagName="CAS"  %>
<%@ Register Assembly="Expo.Training.BRule" Namespace="Expo.Training.BRule.Controls" TagPrefix="CC" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="pagenav"><b>您现在的位置：</b>我的管理平台 > 用户信息管理</div>
<div class="SP">
    <cec:SearchUserPanel runat="server" ID="sup_SearchUserPanel" OnDoSearch="DoSearch_Command" />
</div>
<div style="overflow:auto;">
    <div class="paneltitle">用户列表</div>
    <div style = "float:right; padding-top:6px;">
        <input type="button" id="btSubmit"  runat="server"  onclick="return checkSubmitForm();" value=" 导 出 " class="btn" />
        <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" style = "display:none" />
    </div>
    <div class="clear"></div>
</div>
<div class="DG" id="dv_Result" runat="server" visible="false">
    <table cellspacing="0">
        <thead>
            <tr><th style="display:<%= Customer.CustomerCode.ToLower() == xybcCustomerCode ? "" : "none" %>;"><input type="checkbox" id="ck_All" name="ck_All" /></th>
                <th style="width:7%;">序号</th>
                <th style="width:8%;"><CC:ExSortButton ID="exSBtn_RealName" runat="server" DisplayText="姓名" SortExpression="RealName" OnSortChanged="Sort_Changed" /></th>
                <th style="width:7%;"><CC:ExSortButton ID="exSBtn_Sex" runat="server" DisplayText="性别" SortExpression="Sex" OnSortChanged="Sort_Changed" /></th>
                <th style="width:20%;"><CC:ExSortButton ID="exSBtn_IDCard" runat="server" DisplayText="身份证号码" SortExpression="IDCard" OnSortChanged="Sort_Changed" /></th>
                <th style="width:14%;"><CC:ExSortButton ID="exSBtn_CardID" runat="server" DisplayText="学习卡号" SortExpression="CardID" OnSortChanged="Sort_Changed"></CC:ExSortButton></th>
                <th style="width:18%;"> 学习机构</th>
                <th style="width:10%;"><CC:ExSortButton ID="exSBtn_RegDate" runat="server" DisplayText="创建时间" SortExpression="RegDate" OnSortChanged="Sort_Changed" /></th>
                <th style="width:16%;">操作</th>
            </tr>
        </thead>
        <tbody>
        <asp:Repeater runat="server" ID="rpt_UserList" OnItemCommand="rpt_User_ItemCommand">
            <ItemTemplate>
                <%if (sup_SearchUserPanel.UserStatus == Expo.Training.BRule.Member.MemberConst.MEMBER_STATUS_ALL){%>
                <tr style='background-color:<%# GetBGColor(Eval("Status")) %>;'>
                <%}else{%>
                <tr>
                <%} %>
                <td style="display:<%= Customer.CustomerCode.ToLower() == xybcCustomerCode ? "" : "none" %>;"><input type="checkbox" id="ck_One" runat="server" value='<%# Eval("MemberID") %>' /></td>
                    <td><%# Eval("RowNumber") %></td>
                    <td><%# Eval("RealName")%></td>
                    <td><%# Eval("Gender").ToString() == "2" ? "女" : "男"%></td>
                    <td><%# Eval("IDCard")%></td>
                    <td><%# Eval("CardID")%></td>
                    <td><%# Eval("Department")%></td>
                    <td> <%# Expo.Training.BRule.PublicFunction.GetTime(Convert.ToDateTime(Eval("RegDate")), "short")%></td>
                    
                    <td>
                        <%if (this.Customer.CustomerCode.ToUpper()=="KDLINS")
                          {%>
                              <input type="button" class="editButton" onclick="javascript:location.href='KDUser/EditUser.aspx?id=<%#Eval("MemberID")%>'" /> 
                          <%}else{ %> 
                           <input type="button" class="editButton" onclick="javascript:location.href='EditUser99XB.aspx?id=<%#Eval("MemberID")%>'" /> 
                          <%} %>                 
                        <asp:Button ID="btn_Delete" Visible='<%# Eval("UserAccount").ToString().ToLower() == "admin" ? false : true %>' runat="server" ToolTip="删除该帐户" CausesValidation="true" CommandName="delete" OnClientClick="return confirm('确定要删除吗？')" CommandArgument='<%#Eval("MemberID") %>' CssClass="deleteButton" />
                        <asp:HiddenField ID="hid_UserAccount" Value='<%# Eval("UserAccount") %>' runat="server" />
                        <asp:HiddenField ID="hid_RealName" Value='<%# Eval("RealName")%>' runat="server" />
                    </td>
                </tr>
            </ItemTemplate>        
        </asp:Repeater>
        <tr style="display:<%= Customer.CustomerCode.ToLower() == xybcCustomerCode ? "" : "none" %>;">
	        <td colspan="7" style="height:30px;">
                <asp:Button ID="btnBatchDelete" runat="server" OnClientClick="javascrpt:return confirm('确定要删除所选用户吗？');" Text="删除所选用户" CssClass="btn" onclick="btnBatchDelete_Click" />
                <asp:Button ID="btnBatchUpgrade" runat="server" OnClientClick="javascrpt:return confirm('确定要升级所选用户吗？');" Text="升级所选用户" CssClass="btn" onclick="btnBatchUpgrade_Click" />
	        </td>
	    </tr>
        </tbody>
    </table>
    <div class="expager">
        <div class="right">
            <CC:ExPager ID="cc_ExPager" runat="server" OnIndexChanged="PageIndex_Changed"  />
        </div>
    </div>
</div>
<div class="importantinfo" runat="server" id="dv_NoResult" visible="false">
    没有相关记录，请重新搜索！ 
</div>
<script type="text/javascript" language="javascript">
    jQuery(document).ready(function(){
        jQuery(":checkbox[name='ck_All']").click(function(){
            jQuery("td > :checkbox").attr("checked", this.checked);
            jQuery("th > :checkbox").attr("checked", this.checked);
        });
    });
    function Select1() {}
   
   
function checkSubmitForm()
{
    __doPostBack('ctl00$ContentPlaceHolder1$Button1','');
}
</script>
</asp:Content>